package com.add.petback.service.impl;

import com.add.petback.dao.SellerMapper;
import com.add.petback.model.Seller;
import com.add.petback.service.SellerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Seller)表服务实现类
 *
 * @author makejava
 * @since 2020-03-10 15:54:09
 */
@Service("sellerService")
public class SellerServiceImpl implements SellerService {

    @Resource
    private SellerMapper mapper;

    @Override
    public void insert(Seller object) {
        mapper.insertSelective(object);
    }

    @Override
    public void save(Seller object) {
        mapper.updateByPrimaryKeySelective(object);
    }

    @Override
    public List<Seller> getAll() {
        return mapper.list(new Seller());
    }

    @Override
    public Seller find(Seller object) {
        return mapper.find(object);
    }

    @Override
    public void delete(Seller object) {
        mapper.deleteByPrimaryKey(object.getSellerpk());
    }

    @Override
    public List<Seller> getList(Seller object) {
        return mapper.list(object);
    }

}